package com.xxbb.chapter_8.dome3;

import com.xxbb.util.tool.Tool;

public class Program {
    public static void main(String[] args) throws InterruptedException {
        Ticket ticket = new Ticket();
        Thread thread1 = new Thread(new MyThread("t1", ticket));
        Thread thread2 = new Thread(new MyThread("t2", ticket));
        thread1.start();
        thread2.start();
//        MyDaemon myDaemon = new MyDaemon();
//
//        myDaemon.setDaemon(true);//转换为守护线程
//        myDaemon.start();
        Tool.println("主线程结束");


    }
}
